﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace INSTA.FOOTBALLApplication
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
            //Admin
            routes.MapRoute(
               name: "Admin",
               url: "admin",
               defaults: new { controller = "Admin", action = "Index"}
           );
            //Inscription
            routes.MapRoute(
               name: "Register",
               url: "user/register",
               defaults: new { controller = "User", action = "Create" }
           );
        }
        protected void Application_Start()
        {
            RegisterRoutes(RouteTable.Routes);
        }
    }
}